Skip to content

Conversation

@kadraman
Copy link
Collaborator

@kadraman kadraman commented Jan 13, 2026

This is change for the fcli fod issue update command that includes fixes and update to handle bulk updates of attributes.
See Pull request overview below for more detailed description of changes.
Closes #899,#900,#901

Copilot AI review requested due to automatic review settings January 13, 2026 13:29
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the fcli fod issue update command to fix errors and add enhancements. The changes address three issues: fixing a typo in "Not an Issue" status (#899), adding support for custom developer/auditor statuses as configurable attributes rather than hard-coded enums (#901), and adding attribute support for issue updates (#900). This is a breaking change as the --dev-status and --auditor-status options now accept string values instead of enum values.

Changes:

  • Converted --dev-status and --auditor-status from enum types to string types with runtime validation against FoD attribute picklists
  • Added attribute caching mechanism in FoDIssueHelper to optimize bulk updates
  • Added validation to filter invalid vulnerability IDs before attempting updates
  • Added support for --attributes option to update issue attributes
  • Fixed typo in AuditorStatusType enum ("Not an Issues" → "Not an Issue") and added new Issue and Scan attribute types to AttributeTypes enum

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
FoDMessages.properties Removed trailing whitespace, updated output table headers to include totalCount/updateCount/skippedCount, updated command descriptions to clarify ID formats, added documentation for new --attributes option
FoDEnums.java Fixed typo in AuditorStatusType ("Not an Issues" → "Not an Issue"), added Issue(5) and Scan(6) to AttributeTypes enum
FoDBulkIssueUpdateRequest.java Added attributes field (JsonNode) to support issue attribute updates
FoDIssueHelper.java Added attribute caching (loadAllAttributes, getAttributeDescriptorFromCache), validation methods (resolveStatusValue, filterRequestedVulnIds), and attribute building (buildIssueAttributesNode)
FoDIssueUpdateCommand.java Changed status fields from enums to Strings, added attribute support via mixin, added filtering/validation of vuln IDs, updated action result reporting
Comments suppressed due to low confidence (1)

fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/_common/util/FoDEnums.java:506

  • The fromInt method is missing cases for the new Issue (5) and Scan (6) attribute types. When values 5 or 6 are passed to this method, it will incorrectly return Release instead of the expected Issue or Scan types. Add case statements for these new enum values to ensure correct mapping.
        public static AttributeTypes fromInt(int val) {
            switch (val) {
                case 0:
                    return All;
                case 1:
                    return Application;
                case 2:
                    return Vulnerability;
                case 3:
                    return Microservice;
                case 4:
                default:
                    return Release;
            }
        }

…previous enum values for backwards compatibility
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Error] HTTP 500 Internal Server Error when using fcli fod issue update command

1 participant